home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr37 / inthlp2.zip / INTHLP2.DOC
Text File  |  1993-04-21  |  34KB  |  646 lines

  1. The following is correspondence in response to my posting of
  2. INTHLP.ZIP (INTHLP.DOC) to UseNet comp.sys.dcoms.modems
  3.  
  4.             For Columbia Kermit Users:
  5.  
  6. _______________________________________________________________________
  7. ***********************************************************************
  8.              from Dr. W. Curtiss Priest
  9.       Center for Information, Technology and Society
  10.               Lexington, MA  02173
  11.         Internet: bmslib@mitvma.mit.edu
  12.               Voice: 617-862-7763
  13. _______________________________________________________________________
  14. ***********************************************************************
  15.  
  16. Received: from MITVMA by MITVMA.MIT.EDU (Mailer R2.10 ptf000) with BSMTP id
  17.  0419; Sun, 18 Apr 93 13:48:36 EDT
  18. Received: from watsun.cc.columbia.edu by mitvma.mit.edu (IBM VM SMTP V2R2)
  19.    with TCP; Sun, 18 Apr 93 13:48:32 EDT
  20. Received: by watsun.cc.columbia.edu (5.59/FCB/jba)
  21.     id AA02377; Sun, 18 Apr 93 13:48:26 EDT
  22. Date: Sun, 18 Apr 93 13:48:25 EDT
  23. From: Frank da Cruz <fdc@watsun.cc.columbia.edu>
  24. To: bmslib@mitvma.mit.edu
  25. Subject: IRQs, etc.
  26. Message-Id: <CMM.0.90.4.735155305.fdc@watsun.cc.columbia.edu>
  27.  
  28. Hi.  Loved your article.  Did you see mine?  We ought to put our heads
  29. together and come up with a universal compendium on this.  Here's what
  30. I wrote for Kermit users a few months ago ...  (and didn't say nearly
  31. enough -- e.g. avoided mentioning products [or Rockwell chipsets] by
  32. name for fear of lawsuits...)  - Frank
  33.  
  34. _______________________________________________________________________
  35. ***********************************************************************
  36.  
  37. TROUBLESHOOTING MS-DOS KERMIT SERIAL PORT AND MODEM PROBLEMS
  38.  
  39.   "Why can't MS-DOS Kermit find my COM3 or COM4 port?"
  40.   "Why can Kermit send characters to my COM port, but not read them?"
  41.   "Why doesn't Kermit work with my internal modem?"
  42.  
  43. First, rule out the obvious:  Is everything connected and turned on?  Did you
  44. give a SET PORT command for the right device, and did you give it BEFORE any
  45. other device-related commands, such as SET SPEED and SET PARITY?  Remember,
  46. port-related settings apply to the port that was selected in the most recent
  47. SET PORT command, so a proper sequence would be, for example:
  48.  
  49.   SET PORT COM2       ; First select the port you want to use.
  50.   SET SPEED 19200     ; Then set the desired speed on the selected port,
  51.   SET PARITY EVEN     ; and other parameters for this port, such as parity,
  52.   SET FLOW RTS/CTS    ; flow control,
  53.   SET LOCAL-ECHO OFF  ; and CONNECT-mode echoing.
  54.  
  55. Each of these parameters is remembered for each port, so switching ports (e.g.
  56. SET PORT COM1 after you have given the above sequence of commands) switches
  57. all of these parameters to their previous (or default) values for the port you
  58. have switched to.
  59.  
  60. To see the current port-related parameters, type the MS-DOS Kermit command:
  61.  
  62.   SHOW COMMUNICATIONS
  63.  
  64. This displays all the relevant information about your currently selected
  65. communication device, which is COM1 by default.  Check the settings carefully
  66. to be sure they are what you intended.
  67.  
  68.  
  69.   * * * *
  70.   The following discussion, which applies to MS-DOS Kermit versions 3.11 and
  71.   3.12, is detailed and technical, but most of it boils down to (a) installing
  72.   a patch; (b) telling Kermit two numbers, the port address and IRQ value; and
  73.   (c) fiddling with your modem.  Keep that in mind as you read more about PC
  74.   hardware than you ever wanted to know.
  75.  
  76.  
  77. HOW A PHYSICAL COMMUNICATION PORT IS ASSOCIATED WITH A DOS COMn DEVICE
  78.  
  79. DOS PCs come with full support for two communication ports, COM1 and COM2, but
  80. with provisions for at least two more, COM3 and COM4.  The basic problem with
  81. COM3 and COM4 is that they are not well (or consistently) supported in most
  82. types of PCs, as are COM1 and COM2 which rarely (by themselves) cause any
  83. problems.  This discussion considers only COM1-COM4, since higher-numbered COM
  84. ports are rare, and in any case are not presently supported by MS-DOS Kermit.
  85.  
  86. The digit in the port name is an index into an area in memory that contains
  87. the address of the serial port hardware.  The BIOS (the PC's Basic Input/Ouput
  88. System) has four words reserved starting at segment 40 (hexadecimal), word 0,
  89. to hold the addresses of the first four COM ports.  Word 0 defines COM1, word
  90. 2 (two bytes per word) defines COM2, word 4 COM3, and word 6 COM4.  To view
  91. these addresses:
  92.  
  93.   C:\> debug             (start the debug program)
  94.   -d 40:0                (display segment 40)
  95.   -q                     (quit the debug program)
  96.  
  97. ("C:\>" is the DOS prompt, "-" is the debug prompt.)  Here are the results
  98. of this operation on a PS/2 with 3 COM ports:
  99.  
  100.   0040:0000  F8 03 F8 02 20 32 00 00-BC 03 00 00 00 00 60 03  .... 2........`.
  101.   0040:0010  65 46 00 80 02 00 00 20-00 00 38 00 38 00 3E 34  eF..... ..8.8.>4
  102.   0040:0020  20 39 78 2D 2E 34 78 2D-0D 1C 64 20 20 39 34 05   9x-.4x-..d  94.
  103.   0040:0030  30 0B 3A 27 30 0B 0D 1C-75 16 67 22 20 39 00 00  0.:'0...u.g" 9..
  104.   0040:0040  0A 00 C3 00 00 00 00 00-00 03 50 00 00 10 00 00  ..........P.....
  105.   0040:0050  00 18 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
  106.   0040:0060  0E 0D 00 D4 03 29 22 76-07 35 18 FF F9 C8 0F 00  .....)"v.5......
  107.   0040:0070  00 00 34 12 00 01 00 00-14 14 14 20 01 01 01 01  ..4........ ....
  108.  
  109. The first line contains the COM port information (ignore the other lines, as
  110. well as the funny characters on the right).  "F8 03" is the 2-byte COM1
  111. address, expressed in hexadecimal (base 16) with the low byte shown first.
  112. Thus the actual COM1 address is 03F8 hex, which is expressed in Kermit
  113. commands as \x03f8.  The COM2 address is 02F8, the COM3 address is 3220, and
  114. (since there is no COM4) the COM4 address is 0000.  That is how both DOS and
  115. the BIOS (and hence many communication programs, including Kermit) understand
  116. which ports are defined, and where to find them.
  117.  
  118. When your PC is powered up, the BIOS startup code checks for serial port
  119. hardware (that is, a Universal Asynchronous Receiver/Transmitter, or UART) at
  120. the two port addresses 03F8 and 02F8.  If it finds a UART at the first address
  121. then that address is placed in word 40:0 and declared to be COM1.  Then the
  122. BIOS tries the second address and if successful this address goes into the
  123. first available word at that time, typically 40:2 as the address of COM2.
  124. Thus if you remove a COM1 device then a previously COM2 device will appear in
  125. the COM1 Bios storage area and become COM1 to DOS and Kermit.  What happens to
  126. the other two words depends on the PC model and BIOS.  The IBM PS/2 BIOS fills
  127. in all four words on startup, but most others (there are exceptions) handle
  128. only the first two because that's how IBM did it with the original PCs.
  129.  
  130.   So... just setting switches or jumpers on a serial port board or
  131.   internal modem does NOT define the board to be a particular COM port.
  132.  
  133. Why, then, do some communication programs work with COM3 and COM4 without any
  134. special fiddling?  The answer is that these programs ASSUME that COM3 and COM4
  135. are found at certain addresses, even when there are no entries in segment 40,
  136. the BIOS communication-port area.  Some of these programs show you their
  137. assumptions in a menu (and might allow you to change them), others do not.
  138. The assumed values are usually as follows:
  139.  
  140.   Port   Assumed Address (hexadecimal)
  141.   COM1        03F8
  142.   COM2        02F8
  143.   COM3        03E8
  144.   COM4        02E8
  145.  
  146.   NOTE: PS/2s use different addresses for COM3 and COM4 -- 3220 and 3228,
  147.   respectively, but these addresses are installed by the BIOS into segment 40
  148.   when the PS/2 is started, so well-behaved communication software (like
  149.   Kermit) will use these addresses rather than the defaults listed above.
  150.   Ill-behaved software will ignore the segment-40 addresses and erroneously
  151.   attempt to use its own values, which, with luck, might be correct but, more
  152.   likely, will not work, or at worst, can disrupt normal operation of your PC.
  153.  
  154. Unchecked use of an assumed port address is DANGEROUS if the device is not
  155. really where the software expects, but the software goes ahead and uses the
  156. address anyway, in particular if some other type of device, say a network
  157. adapter, is at the given address.  It can also produce unwanted conflicts
  158. under Windows, OS/2, and DesqView, whose drivers often set the port's
  159. segment-40 word to zero when they want to use the port exclusively and without
  160. interference, and then restore the real address when they are done, and
  161. similar unwanted interference with Int 14H redirectors that allow serial-port
  162. communication software to be used on network connections.
  163.  
  164. Unlike most other PC communication software, Kermit will NOT attempt to use a
  165. communications port unless:
  166.  
  167.   (a) It finds its address in the BIOS comm-port area, segment 40, or:
  168.   (b) You specify the address yourself
  169.  
  170. AND:
  171.  
  172.   The device at the given address passes certain tests, in which registers
  173.   (addresses related to the port's base address) contain certain values that
  174.   are legitimate for a UART.
  175.  
  176. In other words, KERMIT IS MORE CAREFUL than most other communication software,
  177. because does not want to chance disrupting normal operation of (or damaging)
  178. your PC.
  179.  
  180.  
  181. SPECIFYING THE PORT ADDRESS
  182.  
  183. If you tell MS-DOS Kermit to SET PORT COMn (where n is 1, 2, 3, or 4), and
  184. Kermit responds:
  185.  
  186.   Warning, no hardware for this serial port.
  187.   This port will be operated through the BIOS as BIOSn
  188.  
  189. it means that Kermit did not find an address for the port in the BIOS area or
  190. it did find one but the hardware at that address did not look like an IBM-PC
  191. compatible UART.  If the cause of the message is a missing address, you can
  192. tell MS-DOS Kermit the address of the port by issuing the following command:
  193.  
  194.   SET COMn \xhhhh
  195.  
  196. where n is 1, 2, 3, or 4, and hhhh are four hexadecimal digits (0-9, A-F)
  197. representing the 16-bit address.  This command not only informs Kermit of the
  198. address, but also inserts the address into the appropriate word in segment 40
  199. so other programs can find the port (assuming they follow the rules), and so
  200. you don't have to give this command to Kermit again until after the next time
  201. you reboot.
  202.  
  203. After giving the SET COMn command, give a SET PORT COMn command for the same
  204. port.  The SET COMn command must come first, then the SET PORT COMn command,
  205. as in this example for COM3:
  206.  
  207.   set com3 \x3f8   ; Specify the address of COM3
  208.   set port com3    ; Select COM3
  209.  
  210. How do you know what addresses to give?  Suppose you have purchased an
  211. internal modem or an add-on serial port and you want to install it as a
  212. particular COM port, say COM3.  The installation instructions for your device
  213. will tell you how to do this.  The device must be configured -- generally by
  214. setting little switches or installing or removing jumpers.  The manual should
  215. tell you the address for each COM port.  You have to make sure that the
  216. address that you have configured for the device agrees with the address that
  217. Kermit will use.
  218.  
  219. Although it is not recommended that you guess at address values, sometimes it
  220. is the only way (as often with inherited equipment), for which occasions here
  221. is a list of the addresses commonly used for serial ports and internal modems:
  222.  
  223.   Port   Likely Addresses (hexadecimal)
  224.   COM1       03F8
  225.   COM2       02F8
  226.   COM3       03E8, 3220
  227.   COM4       02E8, 3228, 02E0
  228.  
  229. It is relatively unlikely that you will find a serial port at any address not
  230. listed above, but you might find a port at another port's expected address.
  231. The use of these addresses in SET COMn commands should be relatively harmless
  232. (provided you don't also specify an interrupt, explained later); if there is
  233. no error message, Kermit found a possibly usable port.  If there is an error
  234. message, no harm should have been done.
  235.  
  236. Now let's look at the other cause for the "This port will be operated through
  237. the BIOS" message, namely that an address was found in segment 40, but the
  238. device at that address does not appear to be a genuine serial port.  Why would
  239. this happen?  There are several possible explanations, including:
  240.  
  241.  1. The device is at a different address.  Check your device's configuration
  242.     again, or else your SET COMn command.
  243.  
  244.  2. Your device is indeed at the given address, but its registers do not
  245.     contain values expected of a true PC serial port.  In that case, BIOS
  246.     operation is the only alternative.
  247.  
  248.  3. Your device is at the given address, but there is a conflict with another
  249.     device at that address or the machine's bus speed (not CPU speed) is set
  250.     so high that the hardware test gave confusing results.
  251.  
  252. When Kermit operates a port through the BIOS, rather than directly, it will
  253. be MUCH slower and might not work at all because the BIOS requires the CD,
  254. CTS, and DSR modem signals to be asserted by the device connected to the port
  255. (and the CD signal is normally and by default NOT asserted by a modem before
  256. it has made a connection to another modem).  In that case, you will have to
  257. configure the device (e.g. modem) to assert DSR, CTS, and CD always, or wire
  258. your modem cable to fake these signals (e.g. by cross-connecting them to DTR).
  259.  
  260. Assuming you have found the right address for your COM3 or COM4 port (or
  261. nonstandard address for COM1 or COM2), and you want these addresses to be set
  262. correctly for Kermit at all times, even if it doesn't read its initialization
  263. file, you can put a command like the following in your AUTOEXEC.BAT file:
  264.  
  265.   set kermit=com3 \x3e8; com4 \x2e8;
  266.  
  267. If you want the addresses to be set correctly in the BIOS communications area,
  268. so all applications (not just Kermit), can find the ports, put a line like
  269. this in your AUTOEXEC.BAT (substituting the appropriate ports and addresses):
  270.  
  271.   kermit -f nul, set com3 \x3e8, set com4 \x2e8
  272.  
  273.  
  274. INTERRUPTS
  275.  
  276.   "I can send characters to the modem, but I never see any on my screen."
  277.  
  278. This common complaint (often arising from the user's observation of the modem
  279. lights and speaker), also known as "can-talk-but-not-listen syndrome",
  280. usually means that the communication device was found at the expected address,
  281. but Kermit's idea of its interrupt is wrong.  What's an interrupt?
  282.  
  283. To achieve high-speed communication without interfering with other
  284. applications, Kermit reads characters from a serial device using "interrupts".
  285. Whenever a character arrives at the serial device, the device sends a signal,
  286. called an interrupt, that may be "caught" by application software such as
  287. Kermit, leaving the application free to do other work in the meantime without
  288. having to constantly look at the serial port to see if any characters have
  289. arrived (an operation called "polling", which is used by some of the other
  290. communications programs).  Communications programs that use polling are not
  291. sensitive to interrupts being set properly and may therefore work with
  292. improperly-configured machines where Kermit will not (unless you give it the
  293. required information), but they also tend to take over the entire computer.
  294.  
  295. In contrast to polling programs, Kermit is normally waiting for input from the
  296. keyboard, and is therefore idle if you are not typing and no characters are
  297. arriving at the communication port.  In multi-tasking environments such as
  298. Windows or OS/2, this allows other applications the largest possible share of
  299. the CPU while Kermit is running.
  300.  
  301. When a character arrives at the port, an interrupt signals Kermit to wake up
  302. from its keyboard-wait state and read the character from the port.  But Kermit
  303. needs a way of knowing which device the interrupt came from, so it will not
  304. erroneously read characters from the wrong one.  The device is identified by
  305. an Interrupt Request (IRQ) number, a small integer like 3 or 4.  The BIOS does
  306. not record the IRQ number used by a serial port because the BIOS uses polling
  307. rather than interrupts for serial port input and output.  Thus the
  308. communications software has to know which IRQ to use.  By convention from the
  309. original IBM PC, COM1 uses IRQ 4 and COM2 uses IRQ 3.  There is no standard
  310. for COM3 and above, but certain conventions are normally followed:
  311.  
  312.   Port   PS/2  Others
  313.   COM3   IRQ3   IRQ4
  314.   COM4   IRQ3   IRQ3
  315.  
  316.   WARNING: Certain serial port cards and internal modems allow
  317.   themselves to be configured with different IRQ numbers (such as 9),
  318.   even on COM1 or COM2.  Check your device's installation instructions.
  319.  
  320. Some types of PCs (PS/2s, for example) allow sharing of IRQ numbers,
  321. provided each application has its own interrupt service routine and each such
  322. routine is built to chain interrupts properly (i.e. pass them along to other
  323. applications if they have arrived at the wrong place).  This works, for
  324. example, with Kermit on a PS/2; you can run two copies of Kermit under
  325. Microsoft Windows, one using COM2/IRQ3 and the other using COM3/IRQ3 (i.e. two
  326. ports, same IRQ), both doing input and output simultaneously with no
  327. confusion.  On most types of PCs, however, IRQs can NOT be shared, and
  328. therefore each device must have a unique IRQ number.  This caution applies
  329. especially when you have a serial mouse on IRQ 3 or 4.
  330.  
  331. Once Kermit knows the address of a COM port, it tests to see which IRQ number,
  332. 3 or 4, the device uses.  This is a safe test and does not cause any modem
  333. signaling or communication to take place.  The PC architecture has a limited
  334. range of IRQ numbers available, and so (usually) there can not be a unique IRQ
  335. number for each serial port when there are more than two.  This results in the
  336. common limitation that no more than two serial ports can be active at once.
  337.  
  338. MS-DOS Kermit 3.12 and earlier test first for IRQ4, and then if there is no
  339. response, IRQ3.  If both tests fail, a default value is used (on PS/2s, the
  340. default is IRQ4 for COM1 and IRQ3 for COM2-4; on others is it is IRQ4 for
  341. COM1 and COM3, IRQ3 for COM2 and COM4).  No error message is given in this
  342. case, but "can-talk-but-not-listen syndrome" is a likely result.
  343.  
  344. Some add-on communication boards or internal modems are set up to use IRQ
  345. numbers other than 3 or 4 in order to avoid conflicts with COM1 or COM2 and/or
  346. to allow more than two COM ports to be active at once.  But this can be
  347. dangerous -- for example, IRQ 5 (which is sometimes used for this purpose) is
  348. also used by the hard disk controller on the PC/XT.  IRQ 7 is often used by
  349. network boards.  For this reason, Kermit does not automatically test any IRQ
  350. numbers other than 3 or 4, and does not use any other IRQ number by default.
  351.  
  352. But it is sometimes necessary, particularly on ISA (Industry Standard
  353. Architecture) bus machines (PC/ATs and compatibles) and earlier (such as PCs
  354. and XTs) to use an IRQ other than 3 or 4, for example when when an internal
  355. modem is installed as COM3 on IRQ4, and then use of COM1 prevents COM3 from
  356. working, and vice versa.  This problem can often be solved by reconfiguring
  357. the board to use an otherwise unused unique IRQ number.  Ideally this would be
  358. a normally free IRQ such as 10 or 11, but unfortunately most communication
  359. boards are not configurable for IRQs higher than 7.  Here is a brief, and
  360. definitely not comprehensive, guide to the low IRQ numbers (with IRQ numbers
  361. expressed in decimal):
  362.  
  363.   2  Normally available, but some video boards use it to obey an obsolete
  364.      standard for indicating vertical refresh.  Adjust video board jumpers
  365.      to not do this.  On 286's and above IRQ 2 is also known as IRQ 9:
  366.      same IRQ, alternate number.  Windows 3.0 had difficulty with devices
  367.      using IRQ 2, but Windows 3.1 is better.
  368.  
  369.   3  Normally COM2 and COM4.  PS/2's use IRQ 3 for all serial ports above
  370.      COM1.  IRQ3 is also a favorite "factory default" of many local area
  371.      network (LAN) adapters.
  372.  
  373.   4  Normally COM1 and informally COM3 (except on PS/2s).
  374.  
  375.   5  Secondary parallel port.  Parallel ports are rarely interrupt-driven
  376.      (except for Novell RPRINTER users) so this wire becomes free if
  377.      you unjumper the IRQ on the parallel port board.  LAN adapters are
  378.      frequently placed on IRQ 5.  PC/XTs use IRQ 5 for the hard disk.  Be
  379.      careful with this one.
  380.  
  381.   6  Floppy disk drives. Leave it alone!
  382.  
  383.   7  Primary parallel port.  Remove as described for IRQ 5.  Be careful,
  384.      LAN adapters are frequently placed here.
  385.  
  386.   9  Alias for IRQ 2.
  387.  
  388.  10  Usually free.
  389.  
  390.  11  Usually free.
  391.  
  392.  12  Used by the IBM bus mouse, otherwise usually free.
  393.  
  394.  13  QEMM traps math coprocessor errors here, otherwise frequently free.
  395.  
  396.  14  Used by hard disk on 286 and above.  Leave alone!
  397.  
  398.  15  Some SCSI controllers use this.  Usually free.
  399.  
  400. If your communication board uses an IRQ other than 3 or 4, you will experience
  401. the "can talk but not listen" syndrome when using Kermit.  To force Kermit to
  402. both talk AND listen to the device, you must inform Kermit of the device's IRQ
  403. number.  This is done in the SET COMn command, after the address:
  404.  
  405.   SET COMn <address> <irq>
  406.  
  407. for example:
  408.  
  409.   SET COM3 \x03e8 5
  410.  
  411. When you include a number (like 3, 4, 5, 6, or 7) after the port address
  412. (separated by a space), Kermit will skip its IRQ test and use the IRQ number
  413. you have specified when you next give a SET PORT command for that port.
  414.  
  415.   PLEASE NOTE that you MUST AVOID address and IRQ conflicts; these items
  416.   MUST NOT overlap existing equipment.  SERIOUS DAMAGE can result if, for
  417.   example, the IRQ number you give is the same as the one used by your
  418.   disk controller or network adapter.  Incorrect operation can result if
  419.   the interrupt is in use by a less critical device, such as a mouse.
  420.  
  421. It is necessary to specify the IRQ number in either of these two situations:
  422.  
  423.   1. The communication device uses an IRQ number other than 3 or 4.
  424.  
  425.   2. Kermit's IRQ test interferes with Windows or a similar environment,
  426.      and therefore must be skipped.
  427.  
  428. Check your PC's configuration carefully before specifying an IRQ number.
  429. Before starting Kermit, you can use certain public domain or commercial
  430. utilities, such as MAPMEM, Northgate QAPLUS, Quarterdeck MFT, or the MSD
  431. utility shipped with Windows 3.1 to get an idea of which IRQ numbers are
  432. already in use (these utilities are, of course, not foolproof -- for example,
  433. they can't tell what IRQs are used by programs that are not presently loaded).
  434.  
  435. If, even after establishing the device's interrupt correctly, Kermit still
  436. fails to operate correctly (or reliably), check to see whether:
  437.  
  438.   1. Some other device (such as a mouse or LAN adapter) is generating the
  439.      same interrupt.
  440.  
  441.   2. Some other software (such as a mouse driver) is catching the same
  442.      interrupt.
  443.  
  444. If you find a conflict, take whatever means are at your disposal to remove it:
  445. remove the offending device driver or TSR from your CONFIG.SYS or AUTOEXEC.BAT
  446. file, or turn it off temporarily (e.g. with the MOUSE OFF command for certain
  447. mouse drivers); or reconfigure one of the conflicting devices to use a
  448. different interrupt.
  449.  
  450.  
  451. PROBLEMS WITH MODEMS
  452.  
  453.   "I just bought and installed an XYZ V-Dot-Everything internal modem, and
  454.   it works with <name-deleted> and <name-deleted> communication packages,
  455.   but it doesn't work with Kermit".
  456.  
  457. This has long been a common complaint about internal modems.  The same
  458. complaint is also now being heard with alarming frequency about some of the
  459. newer external modems.
  460.  
  461. With internal modems, particularly when they are installed on COM3 or COM4,
  462. the most common problems are:
  463.  
  464.  1. Kermit does not know the modem's address, or the device is using an IRQ
  465.     number other than 3 or 4.  These problems can be fixed by giving the
  466.     appropriate SET COMn command to Kermit.
  467.  
  468.  2. The internal modem is installed incorrectly, with an address or IRQ that
  469.     conflicts with one already in use on your PC.
  470.  
  471.  3. The internal modem does not correctly emulate a real IBM PC serial port,
  472.     and therefore fails Kermit's hardware test, and therefore can only be
  473.     used through the BIOS.
  474.  
  475.  4. The device is in a laptop, notebook, or palmtop computer, and power to
  476.     the internal modem or serial port has been disabled in the CMOS setup,
  477.     or has been turned off automatically when the cover is closed or the
  478.     machine shut down.
  479.  
  480. In recent months (beginning about mid-1992) a new generation of low-cost,
  481. high-speed modems, both internal and external, began to appear on the market.
  482. These modems typically offer a wide range of features: V.32 and V.32bis
  483. modulation, V.42 and MNP error correction, V.42bis and MNP data compression,
  484. etc.  Unfortunately, many of these modems suffer from bugs not found in
  485. earlier (and usually more expensive) modems.  The problems are generally
  486. related to initialization of the modem and interaction with its command
  487. processor.  Some common complaints:
  488.  
  489.  1. An internal modem does not work at all; the modem becomes nonoperational
  490.     as soon as Kermit attempts to access it.  The cause has been traced to the
  491.     fact that Kermit's initialization of the modem's UART is "too fast" for
  492.     some of these new modems.  (This same initialization sequence has been
  493.     used for nearly a decade with no problems, and still works on the
  494.     well-known and reputable brands of internal modems.)
  495.  
  496.  2. "Kermit won't dial or respond to modem commands".  The modem ignores
  497.     dialing or other commands from Kermit.  Or the modem ignores commands when
  498.     Kermit's PARITY is set to a particular value, like EVEN.  Or commands are
  499.     not processed correctly above a certain interface speed.
  500.  
  501.  3. "I can dial successfully, and in general send characters to and through
  502.     the modem, but I never get any characters back."  This looks suspiciously
  503.     like the "talk-but-not-listen" problem, but in some cases it is a bug in,
  504.     or a configuration problem with, the modem, having nothing to do with
  505.     Kermit: the modem is simply not sending any characters to the PC.
  506.  
  507.  4. "After using the modem with <name-omitted> communication software, it
  508.     also works with Kermit, but it won't work with Kermit unless I run
  509.     <name-omitted> first."
  510.  
  511.  5. "I can communicate in command-mode with the modem, up until I give it
  512.     an ATZ command, at which point it seems to die."
  513.  
  514. And so on.  All of these are modem, not Kermit, problems.  Here are some
  515. suggestions for overcoming them:
  516.  
  517.  1. Slow the UART-initialization sequence.  This is accomplished by patch #11
  518.     to MS-DOS Kermit 3.11 and patch #10 to version 3.12.  These patches have
  519.     been tested successfully on several of the misbehaving modems.  Get the
  520.     patch file for your version of Kermit (3.11 or 3.12).  The patch files are
  521.     in kermit/a/msr311.pch and kermit/a/msr312.pch on watsun.cc.columbia.edu
  522.     on the Internet, available via anonymous FTP.  Rename the file to
  523.     MSKERMIT.PCH and put in the same directory as your MSKERMIT.INI file, and
  524.     start Kermit again.  At the MS-Kermit> prompt, give a VERSION command to
  525.     make sure the patches were installed.  If not, give a PATCH command (or,
  526.     better still, make sure that PATCH is the first command in your
  527.     MSKERMIT.INI file, and that your MSKERMIT.INI file is in your DOS PATH so
  528.     Kermit will always execute it).
  529.  
  530.  2. External modems only: Check that your modem cable has wires for (at least)
  531.     the TD, RD, SG, CTS, RTS, DSR, CD, and DTR RS-232 signals.  If it does
  532.     not, replace the cable with a real modem cable, or (temporarily) configure
  533.     your modem to compensate for the missing signals.
  534.  
  535.  3. Read your modem manual and check your modem's configuration.  Perhaps its
  536.     interface speed is locked to a different speed than the one Kermit is
  537.     using.  Perhaps it is set to use hardware flow control, but Kermit is not.
  538.     Also, check its factory and/or saved settings, and under what conditions
  539.     they are restored (for example, are they restored when the PC drops DTR?).
  540.     How are you selecting saved settings -- read your modem manual about (for
  541.     example) the difference between AT&F and AT&F2.  Be aware that the AT&Fn
  542.     commands might not restore all S-registers, so double check them.  Be
  543.     particularly sensitive to the registers that control interface speed,
  544.     modulation technique, error correction, data compression, negotiation, and
  545.     fallback, and note that each modem maker probably uses different registers
  546.     and commands to control each of these features.
  547.  
  548.  4. Try the following sequence to initialize the port (using COM3 in this
  549.     example):
  550.  
  551.       SET COM3 <address> <irq>  ; (if necessary)
  552.       SET PORT 3                ; Select port 3
  553.       HANGUP                    ; Drop DTR on port 3
  554.       SET PORT 3                ; Re-initialize port 3
  555.  
  556.  5. SET PARITY NONE when talking to the modem, and then set parity to
  557.     whatever the remote host or service requires after making the connection.
  558.     (WARNING: MS-DOS Kermit might set its parity to some other value
  559.     automatically as a result of automatic parity detection during file
  560.     transfer.)
  561.  
  562.  6. Ensure that your PC bus speed is 8MHz.  Some PCs (not PS/2s) come with
  563.     a BIOS SETUP facility that lets you change the PC's bus speed, memory wait
  564.     states, etc.  In general, it is dangerous to deviate from the defaults,
  565.     particularly from the 8MHz bus speed, which is a standard for add-on
  566.     devices, and might be required by your communication board or internal
  567.     modem.
  568.  
  569.  7. Modify HAYES.SCR, or whatever dialing script you are using, to take
  570.     extraordinary measures to ensure the modem is in command mode, and to send
  571.     its initialization commands very slowly and to try them repeatedly.  For
  572.     example, change "output ATQ0V1X1\13" to something like this (note: the
  573.     modem-related commands shown here are all relatively portable -- you might
  574.     also need additional modem-specific commands, such as AT&F2 to load a
  575.     particular configuration, or specific S-register settings affecting speed,
  576.     flow control, modulation, fallback, etc.):
  577.  
  578.       WAIT 1 DSR         ; See if modem is asserting Data Set Ready
  579.       IF FAIL FATAL -
  580.        {No DSR signal: Is your modem connected and turned on\63}
  581.       SET PARITY NONE    ; Use no parity
  582.       SET COUNT 5        ; Try 5 times to initialize
  583.       :INIT
  584.       HANGUP             ; Modem is connected - hang up on it.
  585.       CLEAR              ; Clear Kermit's input buffer.
  586.       OUTPUT \B          ; Send a BREAK.
  587.       PAUSE              ; Wait a second.
  588.       OUTPUT \17         ; Send a Ctrl-Q in case modem is Xoff'd.
  589.       PAUSE 2            ; Wait two seconds.
  590.       OUTPUT +           ; Send the most likely escape sequence,
  591.       OUTPUT +           ; which is "+++" with at least a second of
  592.       OUTPUT +           ; "silence" before and after.
  593.       PAUSE 2            ;  ...
  594.       OUTPUT \13         ; Send a carriage return.
  595.       PAUSE              ; Wait a second.
  596.       OUTPUT A           ; Send an A.
  597.       PAUSE              ; Wait another second.
  598.       OUTPUT T           ; Send a T.
  599.       PAUSE              ; Wait another second.
  600.       OUTPUT \13         ; Send a carriage return.
  601.       PAUSE              ; Wait a second.
  602.       CLEAR              ; Clear away echo and response.
  603.       OUTPUT A           ; Send initialization command.
  604.       OUTPUT T           ; One character at a time...
  605.       PAUSE
  606.       OUTPUT Q           ; Q0 = Result codes enabled
  607.       OUTPUT 0
  608.       OUTPUT V           ; V1 = Word result codes
  609.       OUTPUT 1
  610.       OUTPUT X           ; X1 = Dial response level
  611.       OUTPUT 1
  612.       PAUSE
  613.       OUTPUT \13         ; Carriage return terminates the command
  614.       INPUT 3 OK         ; Wait for OK response.
  615.       IF SUCCESS GOTO INITOK  ; Got one.
  616.       IF COUNT GOTO INIT      ; Didn't, try again.
  617.       ECHO Failure to initialize modem.  ; No more tries.
  618.       STOP 1                             ; Fail.
  619.       :INITOK
  620.  
  621.     If this doesn't work, insert a PAUSE command after each OUTPUT command
  622.     or run the script at a lower speed.
  623.  
  624.  8. Dial at a lower speed.  Make your interface speed match the modulation
  625.     speed -- e.g. use 9600 for V.32, 2400 for V.22bis, etc.  Turn off fancy
  626.     modem options like error correction and compression.  etc etc.  NOTE:
  627.     connection problems between the two modems have nothing to do with Kermit
  628.     and are beyond the scope of this document.  If a modem appears to dial
  629.     correctly, gets connection tones, and then hangs up, it is undoubtedly a
  630.     problem between the two modems (involving one modem, both modems, and/or
  631.     the phone company), and indicates a modem configuration problem, a bug,
  632.     or a basic incompatibility between the calling and answering modems.
  633.  
  634.  9. The ATZ problem.  Diagnosis: The modem has a bug that makes it generate a
  635.     spurious interrupt whenever it is given an ATZ command.  Kermit checks the
  636.     interrupt, learns there is no character waiting, and so PROPERLY chains
  637.     the interrupt back to its previous owner, the BIOS.  The BIOS also sees
  638.     there is no data waiting, and so DISABLES (yes, disables) the interrupt.
  639.     Workaround: After this happens, SET PORT to some other serial device, and
  640.     then SET PORT back to the problem device -- this should turn the interrupt
  641.     back on.
  642.  
  643. 10. Call your modem maker's technical support number.  Ask if they have
  644.     replacement chips to fix bugs in your modem.
  645.  
  646.